#include "Discharge.h"
#include "../data/GameInfo.h"

Discharge::Discharge()
{
    SDL_Texture *texture = GameInfo::Instance().texturePool[TexId::TEX_DISCHARGE];
    animation.SetFrameData(texture, 5, 1, {0, 1, 2, 3});
    animation.isLoop = false;
    animation.onFinished = [this] { isValid = false; };
    animation.SetInterval(0.02);
    animation.texture = texture;
    shape.type = ShapeType::RECT;
    damage = 0.5;
    speed = 0;
    shape.w = 300;
    shape.h = 68;
    isOnce = false;
    needRotate = true;
}